<template>
  <div style="padding-bottom: 20px">
    <el-descriptions class="margin-top" :column="6" size="small" border>
      <el-descriptions-item style="width:50px">
        <template #label>
          <div class="cell-item">项目编号</div>
        </template>
        {{ selectProject.projectNo }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">施工井号</div>
        </template>
        {{ selectProject.wellNo }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">施工井号(简)</div>
        </template>
        {{ selectProject.shortNo}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">付款单位</div>
        </template>
        {{ selectProject.paymentdeptName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">开工日期</div>
        </template>
        {{ selectProject.startTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">完工日期</div>
        </template>
        {{ selectProject.completeMonth || '未完工' }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">施工队伍</div>
        </template>
        {{ selectProject.deptThreeName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">生产施工类型</div>
        </template>
        {{ selectProject.constructionName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">经营施工类型</div>
        </template>
        {{ selectProject.operateName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">施工地点</div>
        </template>
        <template #default>
          <dict-tag :options="construction_address" :value="selectProject.constructionAddress" />
        </template>
      </el-descriptions-item>
      <el-descriptions-item>
        <template #label>
          <div class="cell-item">施工内容</div>
        </template>
        {{ selectProject.constructionContent }}
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script lang="js" setup>
import { ref, watch } from 'vue'
// 字典引入
const { proxy } = getCurrentInstance();
const { construction_address } = proxy.useDict('construction_address');

const props = defineProps(['record'])
const selectProject = ref([])

//第一次直接赋值
selectProject.value = props.record[0]
//监听record变化
watch(() => props.record,
  (newprop) => {
    selectProject.value = newprop[0]
  }
)
</script>

<style  scoped>
/** 时间和数字输入框样式 */
</style>
